package com.codi.api.controller.organ;

/**
 * Created by asus on 2018/5/8.
 */

import com.codi.api.controller.BaseController;
import com.codi.api.security.UserUtil;
import com.codi.base.log.annotation.Loggable;
import com.codi.bus.core.resultModel.BaseResult;
import com.codi.bus.core.service.PaymentService;
import com.codi.bus.core.service.organ.OrganPaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by asus on 2018/5/8.
 * 资产
 */
@Slf4j
@RestController
@RequestMapping("/organ/payment")
public class OrganPaymentController extends BaseController{

    @Autowired
    private OrganPaymentService organPaymentService;

    @GetMapping("/wallet")
    @Loggable
    public BaseResult getOrganPayMethodsForWallet(String profileId) {
        Long pId = Long.valueOf(profileId);
        return organPaymentService.getOrganPayMethodsForWallet(UserUtil.getLoginUserId(),pId);
    }

    @GetMapping("/fund")
    @Loggable
    public BaseResult getOrganPayMethodsForFund(String profileId) {
        Long pId = Long.valueOf(profileId);
        return organPaymentService.getOrganPayMethodsForFund(UserUtil.getLoginUserId(),pId);
    }


}
